import request from "@/utils/request";

// 查询项目费用列表
export function listBudget(query) {
  return request({
    url: "/project/budget/list",
    method: "get",
    params: query,
  });
}

// 新增项目费用
export function addBudget(data) {
  return request({
    url: "/project/budget",
    method: "post",
    data: data,
  });
}

// 删除项目费用
export function delBudget(budgetId) {
  return request({
    url: "/project/budget/" + budgetId,
    method: "delete",
  });
}

export function updateBudget(data) {
  return request({
    url: '/project/budget',
    method: 'put',
    data: data
  })
}

export function deleteProjectBudget(planningId) {
  return request({
    url: "/project/budget/deleteByPlanningId",
    method: "delete",
    params: {
      planningId: planningId,
    },
  });
}
